﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace TuongLai_Schools
{
   public class cls_DM_BuoiHoc
    {


       public clsDM_BuoihocCollection Getlist_DM_Buoihoc()
       {
           clsDM_BuoihocCollection DM_BuoihocCollection = new clsDM_BuoihocCollection();
           DbAccess db = new DbAccess();
           db.CreateNewSqlCommand_Text();
           SqlDataReader reader = db.ExecuteReader("Select BuoiHocID,TenBuoiHoc,GhiChu,isChangeable from DM_BuoiHoc");
           while (reader.Read())
           {
               clsDM_Buoihoc objdm_Buoihoc = new clsDM_Buoihoc();
               objdm_Buoihoc.BuoiHocID = (int)reader["BuoiHocID"];
               objdm_Buoihoc.TenBuoiHoc = reader["TenBuoiHoc"].ToString();
               objdm_Buoihoc.GhiChu = reader["GhiChu"].ToString();
               objdm_Buoihoc.isChangeable = (bool)reader["isChangeable"];
               DM_BuoihocCollection.Add(objdm_Buoihoc);
           }
           reader.Close();
           return DM_BuoihocCollection;     
       }
    }
}
